Next | Prev | Up | Top | Contents | Index
Optimizing Multisampling and Transparency
Multisampling provides full-scene antialiasing with performance sufficient for a real-time visual simulation application. However, it isn't free and it adds to the cost of some fill operations. With RealityEngine graphics, some fragment processing operations (blending, depth buffering, stenciling) are essentially free if you aren't multisampling, but do reduce performance if you use a multisample-capable visual. Texturing is an example of a fill operation that can be free on a RealityEngine and isn't affected by the use of multisampling. Note that when using a multisample-capable visual, you pay the cost even if you disable multisampling.
Below are guidelines for optimizing performance for multisampling:
- Multisampling offers an additional performance optimization that helps balance its cost: a virtually free screen clear. Technically, this operation doesn't really clear the screen, but rather allows you to set the depth values in the framebuffer to be undefined. Therefore, use of this clear requires that every pixel in the window be rendered every frame. This clear is invoked with glTagSampleBufferSGIX() (see the reference page for more information).
- When multisampling, using a smaller number of samples and color resolution results in better performance. 8 samples with 8-bit RGB components and a 24-bit depth buffer usually result in good performance and quality. (32-bit depth buffers are rarely needed.)
- Multisampling with stencilling is expensive. If it becomes too expensive, use the polygon offset extension to deal with decal tasks (for example runway strips). See "The Polygon Offset Extension".
- There are two ways of achieving transparency on a RealityEngine system: alpha-blending and subpixel screen-door transparency using glSampleMaskSGIS(). Alpha blending may be slower, since more buffer memory may need to be accessed. For more information about screen-door transparency, see "The Multisample Extension".
Next | Prev | Up | Top | Contents | Index